<?php
// 不在页面显示 notice和waning 信息。
error_reporting( E_ALL ^ E_NOTICE ^ E_WARNING );
$msg = $_REQUEST ? $_REQUEST["msg"] : "";
?>
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <script type="text/javascript" >
        function reloadImage(img){
            // 重新加载验证码
            img.src = "/wbs20052/shop/codeImage.php?r=" + Math.random();
        }
    </script>
</head>
<body>
<h2>登录</h2>
<div style="color:red;font-size:30px;" ><?=$msg?></div>
<form action="/wbs20052/shop/login_service.php" method="post">
    <div>
        <label>用户名: <input type="text" name="username"> </label>
    </div>
    <div>
        <label>密码: <input type="password" name="pwd"> </label>
    </div>
    <div>
        <label style="vertical-align: top;">验证码: <input type="text" name="userCode"> </label>
        <img src="/wbs20052/shop/codeImage.php" style="width: 100px;" onclick="reloadImage(this)" alt="验证码加载失败">
    </div>
    <div>
        <button type="reset">清空</button>
        <button type="submit">登录</button>
    </div>
</form>
</body>
</html>